#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main(){
	int n,a,b;
	cin>>n>>a>>b;
	vector<int>dp(n);
	dp[0]=a;
	string s;
	cin>>s;
	for(int i=1;i<n;i++){
		dp[i]=dp[i-1]+a;
		for(int j=1;j<=i;j++){
			string tmp(s, j, i - j + 1);
			string TMP(s, 0, j);
			int flag = TMP.find(tmp);
			if (flag != -1)
				dp[i] = min(dp[i], dp[j - 1] + b);
		}
	}
		cout << dp[n-1];
	return 0;
}